package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "goods_upgrade_record")
public class GoodsUpgradeRecord {//商品升级记录表

    private long id;//编号

    private long uid;//用户id

    private  String userName;//用户昵称

    private String headImgUrl;//用户头像

    private long orderId;//订单编号

    private long orderCount;//订单数量

    private long goodsId;//商品编号

    private String goodsName;//商品名称

    private long status;//升级状态    0：成功  1:失败

    private String statusString;//升级状态 （文本显示）


    /**
     * 下单时间
     */
    private Timestamp createTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }
    @Basic
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    @Basic
    @Column(name = "head_imgUrl")
    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    @Basic
    @Column(name = "order_id")
    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }
    @Basic
    @Column(name = "order_count")
    public long getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(long orderCount) {
        this.orderCount = orderCount;
    }
    @Basic
    @Column(name = "goods_id")
    public long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(long goodsId) {
        this.goodsId = goodsId;
    }
    @Basic
    @Column(name = "goods_name")
    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }
    @Basic
    @Column(name = "status")
    public long getStatus() {
        return status;
    }

    public void setStatus(long status) {
        this.status = status;
    }
    @Basic
    @Column(name = "status_string")
    public String getStatusString() {
        return statusString;
    }

    public void setStatusString(String statusString) {
        this.statusString = statusString;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }


    public GoodsUpgradeRecord() {
    }

    public GoodsUpgradeRecord(long orderId, long orderCount, long goodsId, String goodsName, long status,
                        String statusString, Timestamp createTime) {
        this.orderId = orderId;
        this.orderCount = orderCount;
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.status = status;
        this.statusString = statusString;
        this.createTime = createTime;
    }
}
